home *** CD-ROM | disk | FTP | other *** search
-
-
- /*⌐ Copyright 1988-1991 UserLand Software, Inc. All Rights Reserved.*/
-
-
-
- #include "appletinternal.h"
-
-
- typedef char smalliconbits [32];
-
- typedef smalliconbits *ptrsmalliconbits, **hdlsmalliconbits;
-
-
-
-
- boolean plotsmallicon (hdlappwindow appwindow, Rect r, short iconlist, short iconnum, boolean flinvert) {
-
- register hdlsmalliconbits hbits;
- register short mode;
- BitMap bmap;
-
- hbits = (hdlsmalliconbits) GetResource ('SICN', iconlist);
-
- if (hbits == nil) /*failed to load the resource*/
- return (false);
-
- r.right = r.left + widthsmallicon; /*we only pay attention to the top, left fields of rectangle*/
-
- r.bottom = r.top + heightsmallicon;
-
- bmap.baseAddr = (Ptr) &(*hbits) [iconnum];
-
- bmap.rowBytes = 2;
-
- bmap.bounds.top = bmap.bounds.left = 0;
-
- bmap.bounds.bottom = r.bottom - r.top;
-
- bmap.bounds.right = r.right - r.left;
-
- if (flinvert)
- mode = notSrcCopy;
- else
- mode = srcCopy;
-
- CopyBits (&bmap, &(*(**appwindow).macwindow).portBits, &bmap.bounds, &r, mode, nil);
-
- return (true);
- } /*plotsmallicon*/
-
-
-